USER = root
PASS = none
SERVER = 192.168.2.160
REMOTE = /usr/lib/enigma2/python/Plugins/Extensions/Elektro/
CPYPATH = ../ftp_elektro

FILES = $(shell find -not -wholename '*/.*' -not -wholename '*/makefile' -not -wholename '*/*.lock' -not -type d)
FTPFILES = $(patsubst %, $(CPYPATH)/%, $(FILES))

default: all


$(CPYPATH)/% : %
	ncftpput -m -u $(USER) -p $(PASS) $(SERVER) $(REMOTE)$(<D) $<
	
	-@mkdir $(subst /,\, $(@D)) 2> NUL
	cp $< $@

info:
	@echo "FILES    $(FILES)"
	@echo "FTPFILES $(FTPFILES)"
	
all: $(FTPFILES)
	
	